import { I18nContext } from '@angular/compiler/src/render3/view/i18n/context';

export class EditeRequest {
  id: string; // 唯一标识
  title: string; // 文章标题或者软件名称
  description: string; // 文章描述，type为2
  type: number; // 编辑类型：1（文章）2（软件）
  author: string; // 作者
  email: string; // 作者邮箱
  phone: number; // 作者电话
  updateContent: string; // 软件更新版本内容，type为2
  content: string; // 文章主体内容
  link: string; // 软件下载地址，type为2
  logo: any; // 软件图标
  constructor(data: any = {}) {
    this.id = data.id;
    this.title = data.title;
    this.description = data.description;
    this.type = data.type;
    this.author = data.author;
    this.email = data.email;
    this.phone = data.phone;
    this.updateContent = unescape(data.updateContent);
    this.content = unescape(data.content);
    this.link = data.link;
    this.logo = data.logo;
  }
}

export class EditeResponse {
  id: string; // 唯一标识
  title: string; // 文章标题或者软件名称
  description: string; // 文章描述，type为2
  type: number; // 编辑类型：1（文章）2（软件）
  author: string; // 作者
  email: string; // 作者邮箱
  phone: number; // 作者电话
  updateContent: string; // 软件更新版本内容，type为2
  content: string; // 文章主体内容，type为1
  link: string; // 软件下载地址，type为2
  collectNum: number; // 收藏数量
  scanNum: number; // 浏览数量
  createTime: string; // 创建时间
  updatetime: string; // 更新时间
  constructor(data: any = {}) {
    this.id = data.id;
    this.title = data.title;
    this.description = data.description;
    this.type = data.type;
    this.author = data.author;
    this.email = data.email;
    this.phone = data.phone;
    this.updateContent = unescape(data.updateContent);
    this.content = unescape(data.content);
    this.link = data.link;
    this.collectNum = data.collectNum;
    this.scanNum = data.scanNum;
    this.createTime = data.createTime;
    this.updatetime = data.updatetime;
  }
}
